<%--
  Created by IntelliJ IDEA.
  User: 电脑
  Date: 2025/9/19
  Time: 15:08
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <table>
        <tr>
            <th>商品id</th>
            <th>商品名</th>
            <th>商品生产商</th>
            <th>商品类型</th>
            <th>商品价格</th>
            <th>商品库存</th>
            <th>功能</th>
        </tr>
        <c:forEach items="${page.data}" var="goods">
            <tr>
                <td>${goods.goodsId}</td>
                <td>${goods.goodsName}</td>
                <td>${goods.goodsFactory}</td>
                <td>${goods.goodsType}</td>
                <td>${goods.goodsPrice}</td>
                <td>${goods.goodsNum}</td>
                <td><a href="deleGoods.do?goodsId=${goods.goodsId}">删除</a></td>
            </tr>
        </c:forEach>
    </table>
    <c:if test="${page.hasPrev}">
        <a href="getGoods.do?pageNum=${page.pageNum-1}">上一页</a>
    </c:if>
    <c:forEach begin="1" end="${page.totalPages}" var="n">
        <a href="getGoods.do?pageNum=${n}">${n}</a>
    </c:forEach>
    <c:if test="${page.hasNext}">
        <a href="getGoods.do?pageNum=${page.pageNum+1}">下一页</a>
    </c:if>
</body>
</html>
